<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Cafe_Aftas
 * @since Cafe Aftas 1.0
 */

	get_header(); ?>

    <div id="content" class="clearfix">
    	<div id="col1" class="col">
    		<div id="photo" class="widget clearfix">
    			<?php if (class_exists('MultiPostThumbnails')
					&& MultiPostThumbnails::has_post_thumbnail('page', 'secondary-image')) :
						MultiPostThumbnails::the_post_thumbnail('page', 'secondary-image', NULL, 'page-secondary-image'); endif; ?>
    			<div id="logo" class="logo">
	    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="Home"><img src="<?php echo get_template_directory_uri(); ?>/img/ca-logo.png" alt="logo" /></a>
		    	</div> <!--! end of #logo -->
	    	</div> <!--! end of #photo -->
	     	<div id="info" class="widget clearfix">
	     		<!--! <div id="page-tile" class="title"><div id="page-title-text" class="title-text"><h1></h1></div></div> -->
	     		<div id="info-textbox" class="textbox">
	     			<h1>Speisen und Getränke</h1>
	     			Öffnungszeiten
	     		</div>
	    	</div> <!--! end of #info -->
    	</div> <!--! end of #col1 -->
    	<div id="col2" class="col">
    		<div id="main-bg-img" class="main-bg-img clearfix">
    			<?php
					// The header image
					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
					if ( is_singular() &&
							has_post_thumbnail( $post->ID ) &&
							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
							$image[1] >= HEADER_IMAGE_WIDTH ) :
						// Houston, we have a new header image!
						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
					else : ?>
					<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
				<?php endif; // end check for featured image or standard header ?>
    		</div> <!--! end of #main-img -->
	    	<div id="main" class="main clearfix">
    			<div id="main-content" class="main-content clearfix" role="main">
	    			<?php while ( have_posts() ) : the_post(); ?>

						<?php get_template_part( 'content', 'page' ); ?>

						<?php comments_template( '', true ); ?>

					<?php endwhile; // end of the loop. ?>
    			</div> <!--! end of #main-content -->
	    	</div> <!--! end of #main -->
    	</div> <!--! end of #col2 -->
    </div> <!--! end of #content -->
    
    <?php get_footer(); ?>
 